<?php


namespace app\api\controller\v1;

use app\api\model\MemberType as MemberTypeModel;
use app\api\service\order\CreateMemberTypeOrder;

class MemberType
{
    /**
     * 获取会员类型列表
     */
    public function getDataList()
    {
        return MemberTypeModel::order('id desc')->select()->toArray();
    }

    /**
     * 创建会员卡订单
     */
    public function createOrder($id)
    {
        $memberType = new CreateMemberTypeOrder($id);
        return $memberType->entrance();
    }
}